/* eslint-disable */
import {
	hiprint
} from 'vue-plugin-hiprint'

// 自定义设计元素1
export const bProvider = function(ops) {
	var addElementTypes = function(context) {
		context.removePrintElementTypes("bProviderModule");
		context.addPrintElementTypes(
			"bProviderModule",
			[
				new hiprint.PrintElementTypeGroup("模板", [
					{
						tid: 'bProviderModule.proData',
						title: '制单日期',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'proData',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							hideTitle: false
						}
					},
					{
						tid: 'bProviderModule.deliveryDate',
						title: '提货日期',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'deliveryDate',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							hideTitle: false
						}
					},
					{
						tid: 'bProviderModule.vehicleNumber',
						title: '承运车号',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'vehicleNumber',
							// hideTitle: "1",
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'bProviderModule.actuaNumber',
						title: '实运车号',
						data: '2022-01-01',
						type: 'text',
						options: {
							field: 'actuaNumber',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'bProviderModule.sequence',
						title: '装车顺序',
						data: '装车顺序',
						type: 'text',
						options: {
							field: 'sequence',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							textContentVerticalAlign: "middle",

						}
					},
					{
						tid: 'bProviderModule.salesList',
						title: '销售清单号',
						data: 'XS888888888',
						type: 'text',
						options: {
							field: 'salesList',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle",

						}
					},
					{
						tid: 'bProviderModule.contract',
						title: '合同号',
						data: '111111',
						type: 'text',
						options: {
							field: 'contract',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.salesType',
						title: '销货类型',
						data: '111111',
						type: 'text',
						options: {
							field: 'salesType',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.unit',
						title: '我方单位',
						data: '111111',
						type: 'text',
						options: {
							field: 'unit',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.plate',
						title: '所属板块',
						data: '111111',
						type: 'text',
						options: {
							field: 'plate',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.salesWarehouse',
						title: '销货仓库',
						data: '111111',
						type: 'text',
						options: {
							field: 'salesWarehouse',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.purchaser',
						title: '购货单位',
						data: '111111',
						type: 'text',
						options: {
							field: 'purchaser',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.purchaseItems',
						title: '购货项目',
						data: '111111',
						type: 'text',
						options: {
							field: 'purchaseItems',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.listplanned',
						title: '清单计划数量',
						data: '111111',
						type: 'text',
						options: {
							field: 'listplanned',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.listWeight',
						title: '清单计划重量',
						data: '111111',
						type: 'text',
						options: {
							field: 'listWeight',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.totalActual',
						title: '实际出库总数量',
						data: '111111',
						type: 'text',
						options: {
							field: 'totalActual',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.totalWeight',
						title: '实际出库总重量',
						data: '111111',
						type: 'text',
						options: {
							field: 'totalWeight',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.totalAmount',
						title: '实际结算总金额',
						data: '111111',
						type: 'text',
						options: {
							field: 'totalAmount',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.contacts',
						title: '联系人',
						data: '111111',
						type: 'text',
						options: {
							field: 'contacts',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.contactNumber',
						title: '联系电话',
						data: '111111',
						type: 'text',
						options: {
							field: 'contactNumber',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.place',
						title: '送货地点',
						data: '111111',
						type: 'text',
						options: {
							field: 'place',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
						
						}
					},
					{
						tid: 'bProviderModule.transactionType',
						title: '交易类型',
						data: '111111',
						type: 'text',
						options: {
							field: 'transactionType',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.method',
						title: '提货方式',
						data: '111111',
						type: 'text',
						options: {
							field: 'method',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.salesman',
						title: '销售人',
						data: '111111',
						type: 'text',
						options: {
							field: 'salesman',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.handled',
						title: '经办人',
						data: '111111',
						type: 'text',
						options: {
							field: 'handled',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.prepared',
						title: '制单人',
						data: '111111',
						type: 'text',
						options: {
							field: 'prepared',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.consignor',
						title: '发货人',
						data: '111111',
						type: 'text',
						options: {
							field: 'consignor',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.remarks',
						title: '备注',
						data: '111111',
						type: 'text',
						options: {
							field: 'remarks',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "center",
							
						}
					},
					{
						tid: 'bProviderModule.details',
						title: '商品明细',
						type: 'table',
						options: {
							field: 'details',
							tableHeaderRepeat: 'first',
							tableFooterRepeat: 'last',
							fields: [{
									text: '厂家',
									field: 'CJ'
								},
								{
									text: '品名',
									field: 'PM'
								},
								{
									text: '材质',
									field: 'CZ'
								},
								{
									text: '规格(mm)',
									field: 'GU'
								},
								{
									text: '尺寸(mn)',
									field: 'CH'
								},
								{
									text: '数量',
									field: 'SL'
								},
								{
									text: '单位',
									field: 'DW'
								},
								{
									text: '计重方式',
									field: 'JZFS'
								},
								{
									text: '重量',
									field: 'ZL'
								},
								{
									text: '单价',
									field: 'DJ'
								},
								{
									text: '金额',
									field: 'JE'
								},
								{
									text: '备注',
									field: 'BZ'
								},
								{
									text: '炉批号',
									field: 'LPH'
								},
								{
									text: '码单明细',
									field: 'MDMX'
								},
								{
									text: '成品号',
									field: 'CPH'
								},
							],
						},
						editable: true,
						columnDisplayEditable: true, //列显示是否能编辑
						columnDisplayIndexEditable: true, //列顺序显示是否能编辑
						columnTitleEditable: true, //列标题是否能编辑
						columnResizable: true, //列宽是否能调整
						columnAlignEditable: true, //列对齐是否调整
						isEnableEditField: true, //编辑字段
						isEnableContextMenu: true, //开启右键菜单 默认true
						isEnableInsertRow: true, //插入行
						isEnableDeleteRow: true, //删除行
						isEnableInsertColumn: true, //插入列
						isEnableDeleteColumn: true, //删除列
						isEnableMergeCell: true, //合并单元格
						
						columns: [
							[{
									title: '厂家',
									align: 'center',
									field: 'CJ',
									width: 150
								},
								{
									title: '品名',
									align: 'center',
									field: 'PM',
									width: 150
								},
								{
									title: '材质',
									align: 'center',
									field: 'CZ',
									width: 150
								},
								{
									title: '规格(mm)',
									align: 'center',
									field: 'GU',
									width: 150
								},
								{
									title: '尺寸(mn)',
									align: 'center',
									field: 'CH',
									width: 150
								},
								{
									title: '数量',
									align: 'center',
									field: 'SL',
									width: 150
								},
								{
									title: '单位',
									align: 'center',
									field: 'DW',
									width: 150
								},
								{
									title: '计重方式',
									align: 'center',
									field: 'JZFS',
									width: 150
								},
								{
									title: '重量',
									align: 'center',
									field: 'ZL',
									width: 150
								},
								{
									title: '单价',
									align: 'center',
									field: 'DJ',
									width: 150
								},
								{
									title: '金额',
									align: 'center',
									field: 'JE',
									width: 150
								},
								{
									title: '备注',
									align: 'center',
									field: 'BZ',
									width: 150
								},
								{
									title: '炉批号',
									align: 'center',
									field: 'LPH',
									width: 150
								},
								{
									title: '码单明细',
									align: 'center',
									field: 'MDMX',
									width: 150
								},
								{
									title: '成品号',
									align: 'center',
									field: 'CPH',
									width: 150
								}
								

							]
						],
		// 				footerFormatter: function(options, rows, data, currentPageGridRowsData) {
		// 					if (data && data['totalCap']) {
		// 						return `
		// 						<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>`
		// 					}
		// 					return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>'
		
		// 				},
					},
					// {tid: 'aProviderModule.logo', title: 'Logo', data: '', type: 'image'},
				]),
				new hiprint.PrintElementTypeGroup("拖拽列表", [{
						tid: 'bProviderModule.creater',
						title: '文本',
						data: '李四',
						type: 'text',
						options: {
							field: 'creater',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},
					{
						tid: 'bProviderModule.printDate',
						title: '长文',
						data: '处处充满创造性',
						type: 'text',
						options: {
							field: 'printDate',
							height: 16,
							fontSize: 6.75,
							fontWeight: "700",
							textAlign: "left",
							textContentVerticalAlign: "middle"
						}
					},

				]),

				new hiprint.PrintElementTypeGroup("辅助", [{
						tid: 'bProviderModule.hline',
						title: '横线',
						type: 'hline'
					},
					{
						tid: 'bProviderModule.vline',
						title: '竖线',
						type: 'vline'
					},
					{
						tid: 'bProviderModule.rect',
						title: '矩形',
						type: 'rect'
					},
					{
						tid: 'bProviderModule.oval',
						title: '椭圆',
						type: 'oval'
					}
				])
			]);
	};
	return {
		addElementTypes: addElementTypes
	};
};




export default [{
	value: 'bProviderModule',
	f: bProvider()
}]
